﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="DistributePlanList.aspx.cs" Inherits="HZ.DrugTrade.Web.Admin.DistributePlanList"
    Title="无标题页" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li class="active"><a href="javascript:void(0);">采购项目列表</a></li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td align="right">
                    <asp:Label ID="lblProjectName" runat="server" Text="采购项目名称："></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtDistriPlanName" runat="server"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="lblProcureTimeFrom" runat="server" Text="采购开始时间："></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtProcureStartTimeFrom" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                        MaxLength="10" Width="63px"></asp:TextBox>-<asp:TextBox 
                        ID="txtProcureStartTimeTo" runat="server"
                            onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" MaxLength="10" 
                        Width="63px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblProcureTimeTo" runat="server" Text="采购结束时间："></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtProcureEndTimeFrom" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                        MaxLength="10" Width="63px"></asp:TextBox>-<asp:TextBox 
                        ID="txtProcureEndTimeTo" runat="server" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"
                        MaxLength="10" Width="63px"></asp:TextBox>
                </td>
                <td align="right">
                    &nbsp;
                </td>
                <td align="left">
                    <hz:HzButton ID="btnSelect" runat="server" Text="查  询" OnClick="btnSelect_Click" 
                        CssClass="searchbtn" Width="70px" />
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwProcurementProjectList" CssClass="mainlist" runat="server" AutoGenerateColumns="False"
        DataKeyNames="ProjectID" OnRowCommand="gvwProcurementProjectList_RowCommand"
        EmptyDataText="暂无符合条件的数据！" OnRowCancelingEdit="gvwProcurementProjectList_RowCancelingEdit"
        OnRowEditing="gvwProcurementProjectList_RowEditing" OnRowUpdating="gvwProcurementProjectList_RowUpdating">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %></ItemTemplate>
                <HeaderStyle Width="30px" />
            </asp:TemplateField>
            <asp:BoundField DataField="ProjectID" HeaderText="采购项目编号" Visible="False" />
            <asp:TemplateField HeaderText="项目名称">
                <ItemTemplate>
                    <a   title="点击查看采购项目的产品列表" href='BidProductList.aspx?ProjectId=<%# Eval("ProjectID") %>'>
                        <asp:Label runat="server" ID="lblProjectName" Text='<%#(DataBinder.Eval(Container,"DataItem.ProjectName")) %>'></asp:Label></a>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtProjectName" runat="server" Text='<%#(DataBinder.Eval(Container,"DataItem.ProjectName")) %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="采购开始时间">
                <ItemTemplate>
                    <asp:Label ID="lblProcureStartTime" runat="server" Text='<%#(DataBinder.Eval(Container,"DataItem.ProcureStartTime","{0:yyyy-MM-dd HH:mm:ss}")) %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtProcureStartTime" runat="server" Text='<%#(DataBinder.Eval(Container,"DataItem.ProcureStartTime","{0:yyyy-MM-dd HH:mm:ss}")) %>'
                        MaxLength="10" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="采购结束时间">
                <ItemTemplate>
                    <asp:Label ID="lblProcureEndTime" runat="server" Text='<%#(DataBinder.Eval(Container,"DataItem.ProcureEndTime","{0:yyyy-MM-dd HH:mm:ss}")) %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtProcureEndTime" runat="server" Text='<%#(DataBinder.Eval(Container,"DataItem.ProcureEndTime","{0:yyyy-MM-dd HH:mm:ss}")) %>'
                        MaxLength="10" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <hz:HzLinkButton ID="lbnMod" runat="server" CommandName="Edit" Text='修改'  OperateType="编辑"></hz:HzLinkButton>
                    <hz:HzLinkButton ID="lbtnDel" runat="server" CommandName="Del" OnClientClick="return  confirm('确认要删除此行信息吗？');"
                        CommandArgument='<%#Eval("ProjectID") %>' Text="删除"  OperateType="删除" Visible="false"></hz:HzLinkButton>
                </ItemTemplate>
                <EditItemTemplate>
                    <hz:HzLinkButton ID="lbnUpdate"  runat="server" CausesValidation="True"
                        CommandName="Update" Text="更新"  Enabled="false" />
                    <hz:HzLinkButton ID="lbnCancel"  runat="server" CausesValidation="False"
                        CommandName="Cancel" Text="取消"  Enabled="true" />
                </EditItemTemplate>
                <HeaderStyle Width="80px" />

            </asp:TemplateField>
        </Columns>
    </asp:GridView>
     <div class="page">
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_OnPageChanged">
    </webdiyer:AspNetPager>
    </div>
    <div class="listip">
        <ul>
            <li>提示:<span>单击项目名称，可以查看该项目的详情</span></li>
        </ul>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnAdd" runat="server" OnClientClick="window.location='DistributePlanAdd.aspx';return false;"
            Text="新增采购项目" CssClass="btn" Width="90px" OperateType="新增" />
    </div>
</asp:Content>
